<template>
    <div class="goods-param">
        <table 
        v-for="(size,key) in goodsParam.sizes" 
        :key="key"
        class="sizes-table">
            <tr v-for="(item,sk) in size" :key="sk" >
                <td v-for="(sizeItem,sizeKey) in item" :key="sizeKey">
                    <span>{{sizeItem}}</span>
                </td>
            </tr>
        </table>
        <table class="infos-table">
            <tr v-for="(item,key) in goodsParam.infos" :key = 'key'>
                <td>{{item.key}}</td>
                <td>{{item.value}}</td>
            </tr>
        </table>
    </div>
</template>

<script>
    export default {
        props:{
            goodsParam:{
                type:Object,
                default(){
                    return {}
                }
            }
        }
    }
</script>

<style scoped>
    .goods-param{
        border-top: 4px solid rgba(100, 100, 100, .1);
        padding: 10px 8px;
        width: 100vw;
    }
    table{
        width: 100%;
    }
    table tr td{
        padding: 10px 0;
        border-bottom: 1px solid rgba(100, 100, 100, .1);
        font-size: .85rem;
    }
    table tr :first-child{
        width: 3rem;
    }
    .infos-table{
        padding-top: 0;
    }
    .infos-table>tr :last-child{
        color: var( --color-tint)
    }
</style>